﻿#ifndef SYSTEMSETTING_1_H
#define SYSTEMSETTING_1_H

#include <QWidget>
#include <QTimer>
#include "Global.h"
#include <QRegExp>
#include <QValidator>
#include <QPushButton>
#include <QLineEdit>
#include "MyPasswordFile.h"
#include <QMessageBox>

namespace Ui {
class SystemSetting_1;
}

class SystemSetting_1 : public QWidget
{
    Q_OBJECT
    
public:
    QLabel* time;
    QLabel* signal;
    void keyHandle(QPushButton* btn, QLineEdit* lineEdit);
    explicit SystemSetting_1(QWidget *parent = 0);
    ~SystemSetting_1();    
public slots:
    void on_Keyboard_clicked();

private slots:
    void show_date_fun();
    void on_buttonSave_clicked();
    void on_buttonNext_clicked();
    void on_buttonBack_clicked();
    void EN_released_slot();
    void EN_pressed_slot();
    void on_buttonBoardswitch_clicked();
    void on_Char3_2_clicked();
    void on_Char1_2_clicked();
    void on_Char2_2_clicked();
    void on_RemoveAll_2_clicked();
    void on_Remove_2_clicked();
    void catchpos_();
private:
    enum {
        Lower = 0,
        Upper = 1
    };
    int toggle;
    void ENkey_board_released();
    void keyBoardConnect();
    QTimer* catchmouse_;
    QStandardItemModel* devinfoModel;
    QDataWidgetMapper* devmapper;
    QStandardItem* devroot;
    QStandardItem* devNO;
    QStandardItem* propertyCode;

    QPushButton* btnEN;
    QString released_text;
    QPoint coursePoint;

    QStandardItemModel* dateTimeModel;
    QDataWidgetMapper* mapper;
    QModelIndex index;
    QStandardItem* m_year;
    QTimer *show_date;
    Ui::SystemSetting_1 *ui;
};

#endif // SYSTEMSETTING_1_H
